package edu.cicese.alz.reports;

/**
 * Created by: Eduardo Quintana Contreras
 * Date: 28/11/11
 * Time: 01:05 PM
 */
public class AccelerometerMeasure {
	private double axisX, axisY, axisZ, magnitude;
	private long timestamp;
	private int dataType; //0: No data; 1: No movement; 2: Movement
	private int magnitudeR;

	public AccelerometerMeasure(double axisX, double axisY, double axisZ, double magnitude, long timestamp) {
		this.axisX = axisX;
		this.axisY = axisY;
		this.axisZ = axisZ;
		this.timestamp = timestamp;
		this.magnitude = magnitude;
	}

	public AccelerometerMeasure(double axisX, double axisY, double axisZ, double magnitude, int magnitudeR, long timestamp) {
		this.axisX = axisX;
		this.axisY = axisY;
		this.axisZ = axisZ;
		this.timestamp = timestamp;
		this.magnitude = magnitude;
		this.magnitudeR = magnitudeR;
	}

	public AccelerometerMeasure(double axisX, double axisY, double axisZ, int magnitudeR, long timestamp) {
		this.axisX = axisX;
		this.axisY = axisY;
		this.axisZ = axisZ;
		this.timestamp = timestamp;
		this.magnitudeR = magnitudeR;
	}

	public AccelerometerMeasure(double axisX, double axisY, double axisZ, long timestamp) {
		this.axisX = axisX;
		this.axisY = axisY;
		this.axisZ = axisZ;
		this.timestamp = timestamp;
	}

//	public AccelerometerMeasure(double[] axes) {
//		this.axisX = axes[0];
//		this.axisY = axes[1];
//		this.axisZ = axes[2];
//		this.magnitude = Math.sqrt(Math.pow(axisX, 2) + Math.pow(axisY, 2) + Math.pow(axisZ, 2));
//		this.magnitudeR = (int)StrictMath.round(magnitude);
//	}

	public AccelerometerMeasure(int dataType, long timestamp) {
		this.dataType = dataType;
		this.timestamp = timestamp;
	}

	public AccelerometerMeasure(double magnitude, long timestamp) {
		this.magnitude = magnitude;
		this.timestamp = timestamp;
	}

	public AccelerometerMeasure(double magnitude, int dataType, long timestamp) {
		this.magnitude = magnitude;
		this.dataType = dataType;
		this.timestamp = timestamp;
	}

	public Double getAxisX() {
		return axisX;
	}

	public void setAxisX(double axisX) {
		this.axisX = axisX;
	}

	public Double getAxisY() {
		return axisY;
	}

	public void setAxisY(double axisY) {
		this.axisY = axisY;
	}

	public Double getAxisZ() {
		return axisZ;
	}

	public void setAxisZ(double axisZ) {
		this.axisZ = axisZ;
	}

	public Double getMagnitude() {
		return magnitude;
	}

	public void setMagnitude(double magnitude) {
		this.magnitude = magnitude;
	}

	public long getTimestamp() {
		return timestamp;
	}

	public void setTimestamp(long timestamp) {
		this.timestamp = timestamp;
	}

	public int getDataType() {
		return dataType;
	}

	public void setDataType(int dataType) {
		this.dataType = dataType;
	}

	public int getMagnitudeR() {
		return magnitudeR;
	}

	public void setMagnitudeR(int magnitudeR) {
		this.magnitudeR = magnitudeR;
	}
}
